home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
(A)TB
/
(A)TBM.ADF
/
Utilities
/
bootmenu.doc
< prev
next >
Wrap
Text File
|
1991-04-20
|
10KB
|
235 lines
BootMenu v1.0
By J davis
09/1990
Synopsis
--------
Bootmenu - a program to allow graphical, interactive selection of
NTSC/PAL screen modes and the enabling/disabling of hard-disks on
every reboot. Also acts as a partial replacement for CBM's setpatch
program. Includes source code in Assembler. Version 1.0 (first
release). Author - John Davis
Purpose
-------
BootMenu serves three purposes :-
Firstly it allows you to disable your auto-configing hard-disk (and
all other auto-config devices) so as to minimise the chances of a
virus or trojan horse attacking your hard-disk when booting of a game
disk, and also to help with running some games/demos that won't run
with a hard-disk active.
Secondly, for people with the 1mb Fat Agnus (8372), it offers a
choice of NTSC and PAL screen modes. PAL is useful for in the USA, as
it offers a 25% increase in screen area (at the expense of being
incompatible with NTSC genlocks etc), whilst NTSC is useful for the
rest of the world, as a lot of games are written for NTSC sized
screens, and the graphics only display the correct aspect ratio in
NTSC mode ( F/A-18 has to be the best example of this, playing
F/A-18 on a PAL screen gives you a very 'squished' looking plane!)
Thirdly, it acts as an improved version of CBM's 'setpatch r' for
people with 1mb of chip memory. CBM's reboot handler will only
survive ONE reboot, meaning that if you use RAD, reboot off a floppy
and then reboot again, the contents of rad: are GONE!!! The reboot
handler this installs is much more reliable - it will only fail if
exec is so damaged the machine _must_ coldboot.
What's more, since it 'wedges' itself into the system you only need
to load it once - it will survive reboots, which is handy if you're
playing several games in a row and don't want to have to re-boot off
the hard-disk to reselect screen mode, all you do is reboot and
BootMenu will let you select system options once again.
Installation
------------
Just run BootMenu - either from the CLI or WorkBench (there's an icon
provided, though it's no artistic masterpiece - I'm a programmer, not
an artist). You should get a message saying that it's installed ok.
IMPORTANT - do NOT run the WorkBench1.3.2 Setpatch program with the
'r' option (option to patch for rad: and 1mb ram) after you have run
BootMenu, as both use the same vector, and hence SetPatch will
disable BootMenu! You should run Setpatch _without_ the 'r' option!!
Also see the section 'virus checkers and BootMenu'
Usage
-----
Once it's installed, the next time you reboot you should be presented
with a menu screen asking whether or not to turn off all the
machine's expansion boards. Click the left button to select 'on'
- this will leave your hard-disk, expansion memory etc enabled, or
click the right button to select 'off' and turn off all the boards.
If you don't make any selection within 10 seconds, the program will
default to the 'no' option and leave all your boards turned on.
If you've got a 1mb Obese Agnus fitted, you'll then be presented with
a second screen, allowing a choice of PAL screen modes (click left
button) or NTSC (click right button). Again, if no choice is made
within 10 seconds the program will default to PAL.
The machine will then carry on it's normal boot sequence ....
Technical Info
--------------
This program uses BOTH a coldcapture and coolcapture handler to do
it's work.
The coldcapture handler is simply used to fix the KickStart1.x bug
regarding 1mb of chip mem. The bug is that ks1.x treats any amount of
chip memory greater than 512k as abnormal, and will do a total cold
reboot, clearing any cold/cool handlers. Our cold-handler fixes this
bug in the ROM, mainly so as to make our cool-handler actually get a
chance to run, but as an added bonus it also acts as an improved
version of setpatch with the 'r' option.
The trouble with the CBM 'setpatch r' is that it doesn't stick around
- the coldcapture vector they (and I) use gets cleared after use,
hence if you want to survive multiple reboots you need to re-insert
yourself into the system. Setpatch fails to do this and hence can
fail to protect rad: if you reboot twice in a row without reloading
setpatch. We DO reinsert ourselves, so unless the system is totally
rebooted (as will happen if you get serious enough memory corruption
from a guru, or from some games), BootMenu should protect rad:.
Moral of the story - use BootMenu instead of setpatch r!!!
Note also that you should ONLY use BootMenu with KickStart 1.x!!!!
The main code for running the screens etc is hung off the
coolcapture vector. Being on coolcapture as opposed to coldcapture
allows us to access much more of the system, as most of the machine
is setup by the time coolcapture runs (this is important if we want
to access exec.library functions such as addmem)
The menu driver runs all the hardware direct (intuition isn't in a
usable state when coolcapture runs), using the window controls so as
to make each screen only take up 1k for it's bitmap as opposed to the
usual 21k. All screens are only 1 plane deep (to conserve memory).
The copper is used to run the screen itself, and also to get more
than 1 colour off the 1 plane screen (reloading the palette on a
per-scanline basis)
The 'core' of bootmenu (approx 2.5k of code, of which 2k is the
bitmaps for the display, the actual code fits in approx 512k bytes!)
installs onto the bottom of the system stack, to avoid having to use
kickmemptr to keep our memory allocated. As the system stack is 6k,
and only 1k is normally used this shouldn't be a problem (bootmenu
uses the opposite end of the stack - there's still at least 2k free).
If worse comes to worse and the system stack grows large (due to
nested exceptions), all that will happen will be that BootMenu is
overwritten - it will not cause the system to lock up in normal
operation.
As we can't guarantee the system stack will be in chip mem, the
screen data and copper list is swapped into and out of chip memory
(swapping preserves the original memory contents - in case rad: was
somehow using the target memory ). I haven't tested the effect of
using MoveSSP (a PD program which places the system stack in fast
ram) but I would guess it's use would prevent BootMenu from
functioning (as expansion memory isn't accessible during the reboot
process).
The NTSC/PAL switch code simply alters the mode bit on the 1mb agnus.
The expansion board disable code is slightly more artistic - it scans
for exapansion boards waiting to be configured, and either tells them
to shutup (if they support it) or configures them out of the way.
Hence by the time expansion.library gets run there's no boards around
- hence nothing gets configured and added to the system.
People who bother to read the included source code will notice it
possible to build a version that will do an AddMem of non-autoconfig
memory on reboot. This was done so as to allow a friend (hi Peter!)
with an old Ronin accelerator board to do a 'fake autoconfig' on his
memory as opposed to being forced to run a cli 'addmem' on every
reboot. As most memory boards are autoconfig nowdays, I haven't
released the executable for that version - but the source code could
be useful for anyone wanting to build a simple memory board. Note
that in the addmem code I set the priority of the ram to -20 to make
sure the 2090a driver uses the chipmem for it's buffers, as the
Ronin memory is NOT capable of being DMA'd to. If your memory does
support DMA, you should raise it's priority to >0 to make the
driver and libraries use it, as this will maximise the amount of free
chip mem you will have after reboot.
The program was assembled using Hisoft's DevPac v2 - it should be
fairly simple to alter the code to assemble under other assemblers
however.
Virus Checkers and BootMenu
---------------------------
As BootMenu hangs around by much the same mechanism as some viruses,
most good virus checkers will give you some warning when run about
ColdCapture and CoolCapture being set and the possibility that this
represents a virus in the system.
If you use VMK, you will actually be able to see an embedded message
confirming that the program on cold|coolcapture is only BootMenu,
with other packages your actions may need to be different.
If you're at all unsure that what's on the vectors may NOT be
Bootmenu, you should re-run BootMenu, as this will over-write the
vectors and re-install itself, disabling any virus that may have been
using them. Simply clearing the vectors (thru your virus checker)
will disable Bootmenu.
As long as you get BootMenu's screens on reboot, you can be 90% sure
no virus is using the coldcapture and coolcapture vectors - however
you should still be cautious, as a virus could pass execution to my
code if it wanted to be clever (haven't yet seen a virus that clever
though!).
Also, as some newer viruses stay in memory _without_ using the
cold/coolcapture vectors, so you should stil run virus checkers!
General Info
------------
I would like to thank all the people on AmigaINFO BBS who helped in
beta testing this program, especially Peter.B Mcintyre, John
Nettleton and Stephen Webber, all of whom were always only too
willing to download new test versions at weird hours to help out
with testing the code on differing machine setups.
If you have any questions about the program, or bug-reports, feel
free to contact me.
The source code and executable are 100% public domain - use or abuse
it as you see fit. If you'd like to use BootMenu on a commercial
package, feel free, though an acknowledgement (or a free copy of the
package!) would be nice!
You can contact me via the following routes :-
mail on internet/usenet/bitnet/janet et al :
chem194@canterbury.ac.nz
"meaningful userid's are for wimps" :-)
BBS email:
'JOHN DAVIS' on AmigaINFO BBS
ph NZ+3-3371531
24 hours a day 1200/2400 baud ccitt
(v22/v22bis)
Snail Mail if you must to:
John Davis
31 Clarence St
ChristChurch 2
New Zealand
ENJOY!!!